package com.lu.service.impl;

import com.lu.bean.User;
import com.lu.service.UserService;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements UserService {
    private User user;

    public void setUser(User user) {
        this.user = user;
    }

    public UserServiceImpl() {
        System.out.println("userService诞生了");
    }

    public UserServiceImpl(User user) {
        this.user = user;
    }

    public void init(){
        System.out.println("init");
    }
    public void destroy(){
        System.out.println("destroy");
    }
    @Override
    public void eat() {
        System.out.println("坛子");
        System.out.println(user);
    }
}
